package cn.briarbear.myblog.repository;

import cn.briarbear.myblog.entity.table.Tag;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.data.jpa.repository.JpaRepository;

/**
 * 标签对用的持久化接口
 */
@CacheConfig(cacheNames = "tag")
public interface TagResository extends JpaRepository<Tag,Integer> {


    @Cacheable
    Tag findByName(String name);

}
